#include <iostream>
using namespace std;
int main()
{
	string str1,str2;
	cin>>str1>>str2;
	int pos=0;
	while(1)
	{
		if(pos+8>str1.length()-1)
		{
			int yushu=str1.length()-pos;
			string ans=str1.substr(pos,yushu);
			cout<<ans;
			while(yushu<8)
			{
				cout<<0;
				yushu++;
			}
			cout<<endl;
			break;
		}
		else
		{
			string ans=str1.substr(pos,8);
			cout<<ans<<endl;
			pos+=8;
		}
	}
	pos=0;
	while(1)
	{
		if(pos+8>str2.length()-1)
		{
			int yushu=str2.length()-pos;
			string ans=str2.substr(pos,yushu);
			cout<<ans;
			while(yushu<8)
			{
				cout<<0;
				yushu++;
			}
			cout<<endl;
			break;
		}
		else
		{
			string ans=str2.substr(pos,8);
			cout<<ans<<endl;
			pos+=8;
		}
	}
	return 0;
}
